package com.crocodileQ.controller;

import com.crocodileQ.common.R;
import com.crocodileQ.domain.VO.CategoryVO;
import com.crocodileQ.service.CategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author 鳄鱼杆
 */
@Slf4j
@RestController
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    /**
     * 所有文章分类查询
     * @return
     */
    @GetMapping("/getCategoryList")
    public R<List<CategoryVO>> getCategoryList(){

        return categoryService.getCategoryList();
    }
}
